package com.team.lostProperty.service.impl;

import com.team.lostProperty.entity.Notice;
import com.team.lostProperty.mapper.NoticeDao;
import com.team.lostProperty.service.NoticeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {

    @Resource
    private NoticeDao noticeDao;


    public void insertNotice(Notice notice) {
        noticeDao.insertNotice(notice);
    }

    @Override
    public List<Notice> selectNotice(Notice notice) {
        return noticeDao.selectNotice(notice);
    }

    @Override
    public int deleteNotice(long id) {
        return noticeDao.deleteNotice(id);
    }

    public List<Notice> selectAll() {
        List<Notice> list=noticeDao.selectAll();
        return list;
    }
}
